Repository navigation
Conversation
The wizard had no OpenCode entry for either plan, and both plans share one key format. A Go subscriber therefore had to reach the Zen base, which bills the credit balance instead of the monthly plan with no error. Two adjacent options write OPENCODE_API_KEY and OPENCODE_GO_API_KEY so the plan is chosen explicitly.
14 of 17 tasks
Extracts opencodeEnvValues so the two billing plans can be asserted without the TUI, and covers the methodOrder wiring: both entries present once, Zen first, and each key landing in its own variable.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OpenCode to the
decepticon onboardwizard, which previously offered no OpenCode entry at all — neither plan. Both plans share one key: a Go subscriber had no correct choice in the wizard, so pointing "Custom OpenAI Endpoint" at the Zen base (or settingOPENCODE_API_KEYin.env) billed the credit balance instead of the monthly Go plan, with no error from either side.Changes
OPENCODE_API_KEY; OpenCode Go (monthly subscription) writesOPENCODE_GO_API_KEY.DECEPTICON_AUTH_PRIORITYthroughmethodOrder, so the selected plan leads the fallback chain.Intent
Blast radius
No workflow, manifest, install script, compose file, Dockerfile, contract or semgrep change.
Diff budget
clients/launcher/cmd/onboard.go, ~50 lines); the other two are its test (clients/launcher/cmd/onboard_opencode_test.go) and theCHAGELOG.mdentry, both excluded from the runtime budget. One logical concern: make the billing plan explicit at install time.End-to-end verification
Run in WSL2 Ubuntu with Go 1.24.5 on the branch head:
gofmt -l clients/launcher/cmd/onboard.go clients/launcher/cmd/onboard_opencode_test.go→ no output.go vet ./...inclients/launcher→ exit 0.go test ./cmd/ -run "Opencode|MethodOrder" -v→ 2 tests, 5 subtests, all PASS:TestMethodOrderListsBothOpencodePlansOnceWithZenFirst— both entries present exactly once, Zen before Go (the priority list is what becomesDECEPTICON_AUTH_PRIORITY).TestOpencodeEnvValuesSeparatesTheTwoBillingPlans— a Zen key writes onlyOPENCODE_API_KEY, a Go key writes onlyOPENCODE_GO_API_KEY, both keys stay in their own variable, blanks write nothing, surrounding whitespace is trimmed.go test ./cmd/...full package → ok.go build -o bin/decepticon .→ 25 MB binary.Verified interactively on 2026-12-01 (WSL2 Ubuntu, launcher built from this branch,
make dogfood, freshDECEPTICON_HOME): the OpenCode Go entry renders in the provider selector, its key form accepts a value, and the completed wizard writes exactlyto
.dogfood/.env— with noOPENCODE_API_KEYline. That is the data path this PR exists to fix: the plan the user picks decides the variable, so a Go subscriber can no longer land on the pay-as-you-go base.Not covered by that run, and not claimed: selecting the OpenCode Zen entry (the sibling branch of the same form), and selecting both entries at once.
Testing
All gates run on this branch in WSL2 Ubuntu (Node 22.23.5, Go 1.24.5):
make qualitypasses (Python + CLI + Web) — its four targets, each exit 0:ci-lint(ruff, format, basedpyright 0 errors / 953 pre-existing warnings),ci-test(6262 passed, 14 skipped in 54.4s),quality-cli(294 tests in 40 files, plusnpm audit, streaming build, typecheck and build),quality-telemetry(typecheck, tests, wrangler dry-run).make smoke— not run for this branch. The diff touches only launcher UI code; the stack build/up/health is what feat(llm): add OpenCode Go OpenAI-compatible gateway #1218 exercised.pytest tests/passes — included in theci-testselection above.go vet ./...exit 0 andgo test ./...ok acrosscmd,internal/*.methodOpencodeAPI/methodOpencodeGoAPI, which do not exist onmain, so the package does not compile before this diff.OPENCODE_GO_API_KEYwrite were run through the real wizard on 2026-12-01 (details above).Quality Bar self-check
Related Issues
Follow-up to #1218.